<template>
	<h3>child</h3>
	<p>{{ aaa }}</p>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue';
import axios from 'axios'
export default defineComponent({
	async setup(){
		let fun = async ()=>{
			return new Promise((resolve, reject)=>{
				setTimeout(()=>{
					resolve('组件 setup 返回一个 promise ')
				}, 2000)
			})
		}
		let aaa = await fun()
		return {
			aaa
		}
	}
	
	
	// async setup(){
	// 	let res = await axios.get('https://websiteapi.feiyubaby.com/api/news/GetNewsListBy?page=1&pageSize=5&seoType=1')
	// 	return {
	// 		aaa: 'axios' + res.data.Message + '__async'
	// 	}
	// }
});
</script>
